import time
from selenium import webdriver
from selenium.webdriver.common.by import By
import os
driver = webdriver.Chrome()
url = 'http://localhost:63342/code/html/popup.html?_ijt=p69flikvre43dviccn39vke5ht'
driver.get(url)
driver.maximize_window()
time.sleep(2)
driver.find_elements(By.CSS_SELECTOR,'button')[0].click()
time.sleep(2)
alert = driver.switch_to.alert
print(alert.text)
alert.accept()
time.sleep(2)
driver.find_elements(By.CSS_SELECTOR,'button')[1].click()
confirm = driver.switch_to.alert
print(confirm.text)
confirm.accept()
time.sleep(2)
# driver.find_elements(By.CSS_SELECTOR,'button')[2].click()
# prompt = driver.switch_to.alert
# print(prompt.text)
# time.sleep(2)
# confirm.accept()
# time.sleep(2)



